package com.karst.essentials.chapter03
{
	import flash.events.Event;
	
	import org.papervision3d.objects.primitives.Arrow;
	import org.papervision3d.view.BasicView;
	
	internal class ArrowExample extends BasicView
	{
		public function ArrowExample()
		{
			super() ;
			createView() ;
			startRendering() ;
		}

		private var arrow : Arrow = null ;
		private function createView() : void
		{
			if( arrow == null )
				arrow = new Arrow( null ) ;
			scene.addChild( arrow ) ;
			arrow.material.doubleSided = true ;
		}
		
		override protected function onRenderTick(event:Event=null):void
		{
			super.onRenderTick() ;
			if( arrow )
			{
				arrow.localRotationY +=2 ;
				arrow.localRotationZ++ ;
			}
		}
	}
}